package com.example.duanjunjie.learn.proxy;

import android.util.Log;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * Created by duanjunjie on 2018/2/13.
 */

public class StudentProxy implements InvocationHandler {
    private Student student;

    public StudentProxy(Student student) {
        this.student = student;
    }

    @Override
    public Object invoke(Object o, Method method, Object[] objects) throws Throwable {
        Log.i("djj","invoke");
        return method.invoke(student,objects[0]+"proxy");
    }
}
